package com.seaboxdata.util;


import org.apache.commons.validator.GenericValidator;

public class EncUtil {

	// 通信信息加密秘钥
	private final static String ymKey="w*2(2s62Kdw_2st3";

	/**
	 * 信息加密
	 * @param message
	 * @return
	 */
	public static String enCryptMsg(String message)
	{
		if (GenericValidator.isBlankOrNull(message))
			return null;
		return SymmetricEncoderUtil.AESUrlSafeEncode(ymKey, message);
	}

	/**
	 * 信息解密
	 * @param message
	 * @return
	 */
	public static String deCryptMsg(String message)
	{
		if (GenericValidator.isBlankOrNull(message))
			return null;
		return SymmetricEncoderUtil.AESUrlSafeDncode(ymKey, message);
	}
}
